<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>SSO Client - Index</title>

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <style>
        body {
            padding-top: 20px;
            background-color: #f8f9fa;
        }
        .container {
            max-width: 800px;
        }
        .card {
            margin-top: 20px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="text-center">
            <h1 class="display-4">Spring Security SSO Client</h1>
            <p class="lead">使用OIDC实现的单点登录客户端示例</p>
            
            <div class="card">
                <div class="card-body">
                    <p>这是一个基于Spring Security OAuth2 Client和OIDC的单点登录客户端应用。</p>
                    <p>点击下方按钮进行登录：</p>
                    <a th:href="@{/oauth2/authorization/freechat}" class="btn btn-primary btn-lg">
                        使用OIDC登录
                    </a>
                    
                    <!-- 显示登录错误信息（如果有） -->
                    <div th:if="${param.login_error}" class="mt-4 alert alert-danger">
                        登录失败，请重试。
                    </div>
                </div>
            </div>
        </div>
    </div>
    
</body>
</html>